package com.xuanyuan.service.impl;

import com.xuanyuan.entity.Post;
import com.xuanyuan.mapper.PostMapper;
import com.xuanyuan.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;

    @Override
    public Post selectPostByName(String postName) {
        return postMapper.selectPostByName(postName);
    }

    @Override
    public Post selectPostById(String id) {
        return postMapper.selectPostById(id);
    }

    @Override
    public List<Post> selectPostList(Post post) {
        return postMapper.selectPostList(post);
    }

    @Override
    public Integer insertPost(Post post) {
        return postMapper.insertPost(post);
    }

    @Override
    public Integer updatePost(Post post) {
        return postMapper.updatePost(post);
    }

    @Override
    public Integer deletePostByIds(String[] ids) {
        return postMapper.deletePostByIds(ids);
    }
}
